function sum(a:number,b:number){
    return a+b;
}

//console.log(sum('a',2))


let a = 10  //类型推断 ==>相当于 let a:number = 10

//数组类型推断
let arr = [1,'a',true]  //相当于 let arr: (number | string | boolean)[] = [1,'a',true]

//看到第11集